<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

<!--    <link rel="stylesheet" href="../js/highlight.js/styles/atelier-cave-light.css"/>-->

<!--    <link rel="stylesheet" href="../js/highlight.js/styles/editormd.css"/>-->

<!--        <link href="https://cdn.bootcss.com/highlight.js/9.6.0/styles/atelier-lakeside-light.min.css" rel="stylesheet"/>-->

    <link href="https://cdn.bootcss.com/github-markdown-css/3.0.1/github-markdown.css" rel="stylesheet">
<!--    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.5/styles/default.min.css">-->

<!--    <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>-->
    <script type="text/javascript" src='https://cdn.jsdelivr.net/npm/marked/marked.min.js'></script>

<!--    <script src="https://cdn.bootcdn.net/ajax/libs/mermaid/0.1.0/mermaid.full.js"></script>-->


    <!--    <script src="https://cdn.bootcss.com/highlight.js/9.11.0/highlight.min.js"></script>-->

<!--    <script src="https://cdn.bootcdn.net/ajax/libs/markdown-it/10.0.0/markdown-it.js"></script>-->

<!--    <script src="../js/highlight.js/lib/languages/javascript.js"></script>-->

    <script src="../js/highlight.js/lib/highlight.js"></script>
<script src="../js/jquery.min.js"></script>
</head>
<body>

<div id="content" class="hljs-function">
<pre class="hljs javascript"><code class="javascript"><span class="hljs-function"><span class="hljs-keyword">function</span>  <span class="hljs-title">getPersonInfo</span>(<span class="hljs-params">name,age,sex</span>) </span>{
    <span class="hljs-built_in">console</span>.log(name+age+sex);
}
<span class="hljs-comment">//要是我这样传,name就成了18，age成了王二了。</span>
getPersonInfo(<span class="hljs-string">'18'</span>,<span class="hljs-string">'王二'</span>,<span class="hljs-string">'男'</span>);
<span class="hljs-comment">//所以可以这样写</span>
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getPersonInfo</span>(<span class="hljs-params">args</span>)</span>{
    <span class="hljs-built_in">console</span>.log(args.name+args.age+args.sex);
}
getPersonInfo({name:<span class="hljs-string">'王二'</span>,age<span class="hljs-string">'18'</span>,sex:<span class="hljs-string">'男'</span>});</code></pre>

</div>

<script>

    hljs.initHighlightingOnLoad();

    let baseUrl = window.location.href.substring(0,window.location.href.lastIndexOf("/")+1);
    let url = baseUrl + 'readme.md';

    $.ajax({
        url:url,
        dataType:'text',
        processData: false,
        type:'get',
        success:function(data){
            // alert(data.name);
            // mak
            // marked(data);
            document.getElementById("content").innerHTML=marked(data);
        },

        error:function(XMLHttpRequest, textStatus, errorThrown) {
            alert(XMLHttpRequest.status);
            alert(XMLHttpRequest.readyState);
            alert(textStatus);
        }});

    window.onload = function () {
        // document.styleSheets[0].cssRules[117].style.backgroundColor="";
    }

</script>
</body>
</html>